import { request } from "./request";
import type {
  PagelistRequest,
  PagelistResponse,
  PlayurRequest,
  PlayurlResponse,
} from "./types";

export const apiPagelist = (data: PagelistRequest) => {
  return request<PagelistResponse>({
    url: "https://api.bilibili.com/x/player/pagelist",
    method: "get",
    data,
  });
};

export const apiPlayurl = (data: PlayurRequest) => {
  return request<PlayurlResponse>({
    url: "https://api.bilibili.com/x/player/wbi/playurl",
    method: "get",
    data,
  });
};
